<?php include "headers/public.phtml"; ?>
<script type="text/javascript">
	$(document).ready(function(){	
		$("#pledge").validate({
			rules: { name: { required: true, minlength: 3 }, email: { required: true, email: true }, phone: { required: true, minlength: 10 }, user_pledge: { required: true, minlength: 3 }, field: { required: true } },
			messages: { name: { required: "Please enter your full name", minlength: "Please enter your full name" }, email: { required: "Please enter your email address", email: "Please enter a valid email address"}, phone: { required: "Please enter your phone number", minlength: "Please enter your phone number in this format (222-222-2222)" }, user_pledge: { required: "Please enter your pledge" }, field: { required: "Please select your area of expertise" } },
			submitHandler: function(form) { pledge(); }
		});
		$("#field").change(function () {
			if ($(this).val() == 'Other') { 
					$("#field_other_div").show('slow'); 
					$("#field_other").rules("add", {
						 required: true,
						 messages: {
						   required: "Please specify your area of expertise"
						 }
					});
			} 
			else { 
				$("#field_other_div").hide('slow'); 
				$("#field_other").rules("remove", {
					 required: true,
					 messages: {
					   required: "Please specify your area of expertise"
					 }
				});
			}
		});
	});
</script>
</head>

<body>
<div class="wrapper">
	<div class="header">
		<div class="logo">
			<h1><a href="<?php echo $sn; ?>"><img src="<?php echo $sn; ?>/images/logo.png" alt="I Pledge To Egypt.org - Support the rebuild of Egypt"></a></h1>
			<h2>Support Egypt's Rebuild</h2>
		</div>
		<div class="stats">
			<div class="content ui-corner-all">
				<div class="title"><h3 class="ui-corner-top">&raquo;&nbsp;Pledge Statistics</h3></div>
				<div class="counters">
					<b><?php echo $this->pledges_counter; ?></b> pledges from <b><?php echo $this->pledge_countries; ?></b> countries, covering <b><?php echo $this->pledge_fields; ?></b> different areas of expertise.
				</div>
			</div>
		</div>
	</div>
	
	<div id="status"></div>
	<div class="form">
		<div class="pledge">
			<h1>Submit Your Pledge</h1>
			<br>
			<form name="pledge" id="pledge" method="post" action="">
				<div class="line"><div class="title">Full Name</div><div class="field"><input type="text" name="name" id="name" class="ui-corner-all"></div></div>
				<div class="line"><div class="title">Email</div><div class="field"><input type="text" name="email" id="email" class="ui-corner-all"></div></div>
				<div class="line"><div class="title">Phone Number</div><div class="field"><input type="text" name="phone" id="phone" class="ui-corner-all"></div></div>
				<div class="line"><div class="title">Country</div><div class="field"><?php include "countries.phtml"; ?></div></div>
				<div class="line"><div class="title"><small>Remain Anonymous</small></div><div class="field"><input type="checkbox" name="anonymous" id="anonymous" value="1">&nbsp;<small>(do not publish my name on this website)</small></div></div>
				<div class="line">
					<div class="title">Area of expertise</div>
					<div class="field">
						<select name="field" id="field" class="required">
							<option value="">Select your area of expertise</option>
							<option value="Architecture">Architecture</option>
							<option value="Aviation">Aviation</option>
							<option value="Business">Business</option>
							<option value="Commerce">Commerce</option>
							<option value="Construction">Construction</option>
							<option value="Engineering">Engineering</option>
							<option value="Financial">Financial</option>
							<option value="Government">Government</option>
							<option value="Information Technology">Information Technology</option>
							<option value="Legal">Legal</option>
							<option value="Media">Media</option>
							<option value="Medical">Medical</option>
							<option value="Real Estate">Real Estate</option>
							<option value="Pharmacology">Pharmacology</option>
							<option value="Shipping">Shipping</option>
							<option value="Social / Public Service">Social / Public Service</option>
							<option value="Science">Science</option>
							<option value="Teaching">Teaching</option>
							<option value="Transportation">Transportation</option>
							<option value="Other">Other</option>
						</select>
					</div>
				</div>
				<div class="line" id="field_other_div"><div class="title"></div><div class="field"><small>Please Specify</small><br><input type="text" name="field_other" id="field_other" class="ui-corner-all"><br></div></div>
				<div class="line">
					<div class="wide">What are you able to participate in?<br>
						<ul class="willingness">
							<li><input type="checkbox" name="willingness[]" value="discussions">&nbsp;<b>Discussions</b> - Participate in government / public discussions</li>
							<li><input type="checkbox" name="willingness[]" value="entrepreneurship">&nbsp;<b>Entrepreneurship</b> - Start businesses in Egypt / Return to work in Egypt</li>
							<li><input type="checkbox" name="willingness[]" value="mentoring_and_Training">&nbsp;<b>Mentoring & Training</b> - Help educate & train Egyptians</li>
							<li><input type="checkbox" name="willingness[]" value="volunteering">&nbsp;<b>Volunteering</b> - Volunteer in general (labor, construction, medical, etc..)</li>
							<li><input type="checkbox" name="willingness[]" value="promote_egypt">&nbsp;<b>Promoting</b> - Promote Egypt's interests in investment & tourism overseas</li>
							<li><input type="checkbox" name="willingness[]" value="fund_raising">&nbsp;<b>Fund Raising</b> - Raise funds for investment in Egypt</li>
							<li><input type="checkbox" name="willingness[]" value="invest">&nbsp;<b>Investing</b> - Financially invest in Egypt</li>
							<li><input type="checkbox" name="willingness[]" value="participate_in_ipte">&nbsp;<b>Join the Campaign</b> - Actively participate in the I Pledge to Egypt campaign</li>
							<li><input type="checkbox" name="willingness[]" value="tourism">&nbsp;<b>Tourism</b> - Visit Egypt for tourism</li>
						</ul><br>
					</div>
				</div>					
				<div class="line">
					<div class="title">City of interest</div>
					<div class="field">
						<select name="city" id="city">
							<option value="All of Egypt">All of Egypt</option>
							<option value="Cairo">Cairo</option>
							<option value="Alexandria">Alexandria</option>
							<option value="Aswan">Aswan</option>
							<option value="Asyut">Asyut</option>
							<option value="Banha">Banha</option>
							<option value="Beni Suef">Beni Suef</option>
							<option value="Damanhur">Damanhur</option>
							<option value="Edfu">Edfu</option>
							<option value="Faiyum">Faiyum</option>
							<option value="Ismailia">Ismailia</option>
							<option value="Kafr el-Dawwar">Kafr el-Dawwar</option>
							<option value="Kafr el-Sheikh">Kafr el-Sheikh</option>
							<option value="Luxor">Luxor</option>
							<option value="Mahalla">Mahalla</option>
							<option value="Mansoura">Mansoura</option>
							<option value="Minya">Minya</option>
							<option value="Port Said">Port Said</option>
							<option value="Qena">Qena</option>
							<option value="Shibin El Kom">Shibin El Kom</option>
							<option value="Sina">Sina</option>
							<option value="Sohag">Sohag</option>
							<option value="Suez">Suez</option>
							<option value="Tanta">Tanta</option>
						</select>
					</div>
				</div>			
				<div class="line"><div class="wide"><br>Your Pledge<br><textarea name="user_pledge" id="user_pledge" class="ui-corner-all"></textarea></div></div>
				<div class="line"><div class="wide"><input type="submit" name="submit_pledge" id="submit_pledge" value="Submit Pledge &raquo;" class="ui-corner-all"></div></div>
			</form>
		</div>
		<div class="vspacer"></div>
		<div class="content">
			<h1>Our Mission</h1>
			<div class="text">
			To undertake a worldwide campaign aimed to generate, collect, and coordinate pledges towards the rebuild of Egypt.<br><br>
				<div class="important">
				<ul>
					<li><b>We do NOT collect donations or funds</b></li>
					<li><b>We only collect and verify pledges</b></li>
					<li><b>We have no political agenda</b></li>
				</ul>
				</div>
			</div>
			
			<h1>Upcoming Milestones</h1>
			<div class="text">
			<ul>
				<li><b>1st</b> -  Collect 100 pledges&nbsp;<b class="important">&nbsp;&#10003;&nbsp;&nbsp;Reached on Feb. 18th, 2011</b></li>
				<li><b>2nd</b> - At 500 pledges, begin reform dialogue & considerations for becoming a Non-Governmental Organization</li>
				<li><b>3rd</b> - At 1000 pledges, coordination of reform committees with Egyptian authorities</li>
			</ul>
			</div>
			
			<h1>Your Pledge</h1>
			<div class="text">
			Your pledge is a commitment to help and participate in the rebuild of Egypt. It can be anything from volunteering your time, to committing money for a specific sector (engineering, healthcare, legal counselling, media and marketing, social work, etc...), to pledging to visit Egypt on a regular basis to contribute to its tourism industry. 
			</div>
			
			<h1>How it works</h1>
			<div class="text">
			We collect pledges from individuals, corporations, government bodies, and charity organizations. The pledges are compiled in a database of commitments and expertise, which will be used to form specialized committees to discuss, and propose reforms ideas, relative to specific sectors (medical, educational, media, legal, etc...). Once a unified transition government is put in place, as approved by the Egyptian people, we will coordinate the data collected with them, to help bring about the discussed reform ideas, and get involved with the rebuild process.
			</div>
			
			<h1>Privacy</h1>
			<div class="text">
			All information collected on this website will be maintained in strict confidentiality. It will NOT be divulged to any entities other than the approved Egyptian transition government.
			</div>
		</div>
	</div>
	
	<div class="join ui-corner-all">Help us spread the word<br><a href="<?php echo $sn; ?>/join">Join This Effort</a></div>
	
	<div class="pledges">		
		<div class="left">
		<h1>&raquo; Last 10 Pledges</h1>
		<div class="view_all"><a href="<?php echo $sn; ?>/pledges/all">View All &raquo;</a></div>
		<?php 	if ($this->pledges) 
				{ 
					$tools = new Pledges();
					foreach ($this->pledges as $p) 
					{
		?>
							<div class="pledge ui-corner-all">
								<div class="title">
									<div class="flag"><img src="<?php echo $sn; ?>/images/flags/<?php echo $p->country; ?>.png" alt="<?php echo $p->country; ?>" width="32px" height="32px"></div>
									<div class="content">
										<?php if ($p->field) { echo "<b>" . $p->field . " Expertise</b><br>"; } ?>
										"<?php if (strlen($p->pledge) > 350) { echo substr($p->pledge,0,350) . "..."; } else { echo $p->pledge; } ?>"										
									</div>
								</div>
								<div class="pledger">
									<?php if ($p->anonymous) { echo "Anonymous"; } else { echo $p->full_name; } ?><?php echo " - " . $tools->getRelativeTime($p->created); ?><br>
									<a href="<?php echo $sn; ?>/pledges/<?php echo $p->pledge_id; ?>">More &raquo;</a>
								</div>
							</div>
							<div class="spacer"></div>
		<?php 
					}
				} 
		?>
		</div>
		<div class="right">
			<h1>&raquo; In The News</h1>
			<ul class="news">
				<li><a href="http://swo.ctv.ca/?video=416769" target="_blank">February 11th, 2011 - Adham El-Menoufy Presents ipledgetoegypt.org on CTV Canada<br><br>
				<img src="<?php echo $sn; ?>/images/ipledgetoegypt.org-featured-on-ctv-news-canada.png" alt="ipledgetoegypt.org was featured on CTV News Canada on February 11th, 2011"></a>
				</li>
				<li><a href="http://www.free-press-release.com/news-newly-released-website-aims-to-gather-support-for-the-rebuild-of-egypt-1296770304.html" target="_blank">February 3rd, 2011 - Press Release<br><br>NEWLY RELEASED WEBSITE AIMS TO GATHER SUPPORT FOR THE REBUILD OF EGYPT
				</a></li>
			</ul>
			<h1>&raquo; Social Feed</h1>
			<script src="http://widgets.twimg.com/j/2/widget.js"></script>
			<script>
			new TWTR.Widget({
			  version: 2,
			  type: 'search',
			  search: 'Egypt',
			  interval: 6000,
			  title: 'Egypt\'s People\'s Revolution - LIVE',
			  width: 470,
			  height: 700,
			  theme: {
			    shell: {
			      background: '#000000',
			      color: '#ffb300'
			    },
			    tweets: {
			      background: '#ffffff',
			      color: '#444444',
			      links: '#1985b5'
			    }
			  },
			  features: {
			    scrollbar: false,
			    loop: false,
			    live: true,
			    hashtags: true,
			    timestamp: true,
			    avatars: true,
			    toptweets: true,
			    behavior: 'default'
			  }
			}).render().start();
			</script>
		</div>		
	</div>
	
	<div class="spacer"></div>
	
	
	<div id="disqus_thread" class="disqus"></div>
	<script type="text/javascript">
	    var disqus_shortname = 'ipledgetoegypt';
	    (function() {
	        var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
	        dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js';
	        (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
	    })();
	</script>
	

</div>

<?php include "footers/public.phtml"; ?>